load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "backupresolver",
    srcs = ["targets.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/backupccl/backupresolver",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/keys",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/descs",
        "//pkg/sql/catalog/resolver",
        "//pkg/sql/catalog/schemadesc",
        "//pkg/sql/isql",
        "//pkg/sql/sem/catconstants",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondata",
        "//pkg/sql/sqlerrors",
        "//pkg/util/hlc",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "backupresolver_test",
    srcs = [
        "main_test.go",
        "targets_test.go",
    ],
    embed = [":backupresolver"],
    deps = [
        "//pkg/ccl",
        "//pkg/ccl/storageccl",
        "//pkg/keys",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/security/username",
        "//pkg/server",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/dbdesc",
        "//pkg/sql/catalog/descbuilder",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/schemadesc",
        "//pkg/sql/catalog/tabledesc",
        "//pkg/sql/catalog/typedesc",
        "//pkg/sql/parser",
        "//pkg/sql/sem/catid",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondata",
        "//pkg/sql/types",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
    ],
)
